<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品详情 - 电商网站</title>
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
    <header>
        <div class="container">
            <h1 class="logo">电商网站</h1>
            <nav>
                <ul>
                    <li><a href="index.html">首页</a></li>
                    <li><a href="#" id="login-link">登录</a></li>
                    <li><a href="register.html">注册</a></li>
                    <li><a href="cart.html">购物车 (<span id="cart-count">0</span>)</a></li>
                    <li><a href="profile.html">我的账户</a></li>
                </ul>
            </nav>
        </div>
    </header>

    <main class="container">
        <section class="product-detail">
            <div class="product-gallery">
                <div class="main-image">
                    <img id="product-image" src="" alt="商品主图">
                </div>
            </div>
            
            <div class="product-info">
                <h1 id="product-name"></h1>
                <div class="product-price" id="product-price"></div>
                <div class="product-stock" id="product-stock"></div>
                <p class="product-description" id="product-description"></p>
                
                <div class="quantity-selector">
                    <label for="quantity">数量:</label>
                    <input type="number" id="quantity" min="1" value="1">
                </div>
                
                <button id="add-to-cart" class="add-to-cart">加入购物车</button>
                <button id="buy-now" class="buy-now">立即购买</button>
            </div>
        </section>
        
        <section class="product-reviews">
            <h2>商品评价</h2>
            <div class="reviews-list" id="reviews-list">
                <!-- 评价将通过JavaScript动态加载 -->
            </div>
        </section>
    </main>

    <footer>
        <div class="container">
            <p>&copy; 2023 电商网站. 保留所有权利.</p>
        </div>
    </footer>

    <script src="js/product.js"></script>
</body>
</html>